<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../../layuiadmin/style/admin.css" media="all">
</head>
<body>

<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <table class="layui-hide" id="table_list" lay-filter="table_list"></table>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="../../../../layuiadmin/layui/layui.js"></script>
<script>
    layui.config({
        base: '../../../../layuiadmin/',//静态资源所在路径
        version: true
    }).extend({
        index: 'modules/admin/index',//主入口模块
    }).use(['index', 'table_common'], function () {
        let table_common = layui.table_common,
            common = layui.common,
            table = layui.table,
            model_url = '/financial/balance';

        let m_id = common.get_query_variable('id');
        table_common.set_model_url(model_url);//设置默认模块地址

        table.render({
            elem: '#table_list',
            url: layui.setter.apiHost + model_url + '/detail',
            where: {m_id: m_id},
            cols: [[
                {type: 'checkbox'},
                {field: 'id', title: 'ID', width: 70, align: 'center'},
                {field: 'amount', title: '金额', width: 120},
                {field: 'balance', title: '账户余额', width: 100},
                {field: 'event', title: '类型', width: 120, align: 'center'},
                {field: 'detail_no', title: '单号', width: 200},
                {field: 'note', title: '备注'},
                {field: 'created_at', title: '创建时间', width: 170, align: 'center'}
            ]],
            page: true,
            done: function () {
                table_common.set_button(model_url);
            }
        });
    });
</script>
</body>
</html>
